#!/usr/bin/python
# -*- coding:utf-8 -*-

"""
appscan 迁移到 nscan， 刷新任务配置
"""

from app.db.models.asset_tasks import AssetTasks
from app.libs.utils import enable_web_sec_task


def rescan():
    print("开始更新......")
    for at in AssetTasks.objects.filter(triggerType="schedule", taskGroupType="web_security"):
        enable_web_sec_task(asset_task=at)
    print("更新结束......")
